Class com.symantec.itools.vcafe.openapi.datatransfer.TransferableVisualObjects
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.symantec.itools.vcafe.openapi.datatransfer.TransferableVisualObjects

Object
   |
   +----StringSelection
           |
           +----com.symantec.itools.vcafe.openapi.datatransfer.TransferableVisualObjects

public class TransferableVisualObjects
extends StringSelection
Adds StringSelection functionality to transferable VisualObjects.

The system clipboard essentially ignores non StringSelection transferables, so we wrap VisualObjects in order to force the system clipboard to freshen/clear Visual Cafe's clipboard.

Version:
1.0
Author:
Symantec Internet Tools Division
Since:
VCafe 3.0
See Also:
VisualCafeClipboard, getClipboard

Variable Index

 o transferableVisualObjectsFlavor
The DataFlavor of transferable VisualObjects.

Constructor Index

 o com.symantec.itools.vcafe.openapi.datatransfer.TransferableVisualObjects(VisualObject[])
Constructs a TransferableVisualObjects object that wraps the given VisualObjects as a Transferable object.
 o com.symantec.itools.vcafe.openapi.datatransfer.TransferableVisualObjects(VisualObject)
Constructs a TransferableVisualObjects object that wraps the given VisualObject as a Transferable object.
 o com.symantec.itools.vcafe.openapi.datatransfer.TransferableVisualObjects(VisualObject, String)
Constructs a TransferableVisualObjects object that wraps the given VisualObject as a Transferable object.
 o com.symantec.itools.vcafe.openapi.datatransfer.TransferableVisualObjects(VisualObject[], String)
Constructs a TransferableVisualObjects object that wraps the given VisualObjects as a Transferable object.

Method Index

 o getTransferData(DataFlavor)
Gets an object which represents the data to be transferred.
 o getTransferDataFlavors()
Gets an array of DataFlavor objects indicating the formats the data can be provided in.
 o getVisualObjects()
Gets the transferable VisualObjects.
 o isDataFlavorSupported(DataFlavor)
Determines whether the specified data flavor is supported for this object.

Variables

 o transferableVisualObjectsFlavor
public static final java.awt.datatransfer.DataFlavor transferableVisualObjectsFlavor
The DataFlavor of transferable VisualObjects.

Constructors

 o TransferableVisualObjects
public TransferableVisualObjects(VisualObject[] vos)
Constructs a TransferableVisualObjects object that wraps the given VisualObjects as a Transferable object.

Note: the transfer data of the StringSelection flavors is the text "Visual Objects".

Parameters:
vos - the VisualObjects to wrap as a Transferable object.
 o TransferableVisualObjects
public TransferableVisualObjects(VisualObject vo)
Constructs a TransferableVisualObjects object that wraps the given VisualObject as a Transferable object.

Note: the transfer data of the StringSelection flavors is the text "Visual Objects".

Parameters:
vo - the VisualObject to wrap as a Transferable object.
 o TransferableVisualObjects
public TransferableVisualObjects(VisualObject vo,
                                 String textValue)
Constructs a TransferableVisualObjects object that wraps the given VisualObject as a Transferable object.

Parameters:
vo - the VisualObject to wrap as a Transferable object.
textValue - the String to use for the transfer data of the StringSelection flavors.
 o TransferableVisualObjects
public TransferableVisualObjects(VisualObject[] vos,
                                 String textValue)
Constructs a TransferableVisualObjects object that wraps the given VisualObjects as a Transferable object.

Parameters:
vos - the VisualObjects to wrap as a Transferable object.
textValue - the String to use for the transfer data of the StringSelection flavors.

Methods

 o getTransferData
public synchronized java.lang.Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
Gets an object which represents the data to be transferred. The class of the object returned is defined by the representation class (DataFlavor.getRepresentationClass()) of the flavor.

Parameters:
flavor - the requested flavor for the data.
Returns:
The data to be transferred.
Throws: IOException
if the data is no longer available in the requested flavor.
Throws: UnsupportedFlavorException
if the requested data flavor is not supported.
Overrides:
getTransferData in class StringSelection
See Also:
getRepresentationClass
 o getTransferDataFlavors
public synchronized java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Gets an array of DataFlavor objects indicating the formats the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).

The StringSelection flavors are at the end of the array.

Returns:
an array of data flavors in which this data can be transferred
Overrides:
getTransferDataFlavors in class StringSelection
 o getVisualObjects
public com.symantec.itools.vcafe.openapi.VisualObject[] getVisualObjects()
Gets the transferable VisualObjects.

Returns:
an array of the VisualObjects being transferred.
 o isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
Determines whether the specified data flavor is supported for this object.

Parameters:
flavor - the requested flavor for the data.
Returns:
true if the DataFlavor is supported, false otherwise.
Overrides:
isDataFlavorSupported in class StringSelection

All Packages  Class Hierarchy  This Package  Previous  Next  Index